﻿using System;
using Autodesk.Revit.DB;
using YJKRevitKernel.RevitObjectCompareUtility;

namespace YJKRevitKernel.ShortPathSuite
{
	public class BaseEndPointPacker
	{
		public XYZ UseEndPoint
		{
			get
			{
				return this.m_UseEndPoint;
			}
		}

		public bool IfStartPoint
		{
			get
			{
				return this.m_bIfStartPoint;
			}
			set
			{
				this.m_bIfStartPoint = value;
			}
		}

		protected object Tag
		{
			get
			{
				return this.tag;
			}
			set
			{
				this.tag = value;
			}
		}

		public BaseEndPointPacker()
		{
		}

		public BaseEndPointPacker(XYZ inputPoint, bool ifIsStartPoint, object inputTag)
		{
			this.m_UseEndPoint = inputPoint;
			this.IfStartPoint = ifIsStartPoint;
			this.Tag = inputTag;
		}

		public override bool Equals(object obj)
		{
			if (!(obj is BaseEndPointPacker))
			{
				return false;
			}
			BaseEndPointPacker baseEndPointPacker = obj as BaseEndPointPacker;
			return baseEndPointPacker != null && baseEndPointPacker.UseEndPoint != null && this.UseEndPoint != null && (new XYZEqualityComparer().Equals(this.UseEndPoint, baseEndPointPacker.UseEndPoint) || base.Equals(obj));
		}

		public override int GetHashCode()
		{
			return base.GetHashCode();
		}

		protected XYZ m_UseEndPoint;

		protected bool m_bIfStartPoint;

		private object tag;
	}
}
